<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <!-- import CSS -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<body>
<div id="app">
    <el-dropdown split-button type="primary" @click="handleClick" @command="handleCommand">
        更多菜单
        <el-dropdown-menu slot="dropdown">
           <!-- <el-dropdown-item>黄金糕</el-dropdown-item>
            <el-dropdown-item>狮子头</el-dropdown-item>
            <el-dropdown-item>螺蛳粉</el-dropdown-item>
            <el-dropdown-item>双皮奶</el-dropdown-item>
            <el-dropdown-item>蚵仔煎</el-dropdown-item>-->
            <el-dropdown-item v-for="name in arr" :command="name">{{name}}</el-dropdown-item>

        </el-dropdown-menu>
    </el-dropdown>
</div>
</body>
<!-- import Vue before Element -->
<script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js"></script>
<!-- import JavaScript -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script>
    let v=new Vue({
        el: '#app',
        data: function() {
            return {
                arr:["刘备","关羽","张飞"]
            }
        },
        methods: {
            handleClick() {
                alert('button click');
            },
            handleCommand(command) {
                this.$message('click on item ' + command);
            }
        }
    })


</script>
</html>